<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">
       <h3>数字 {{num}}</h3>
       <h3>姓名{{username}}</h3>
    </div>
    
</body>
<script>
    function  Vue(option){
        this.target = document.querySelector(option.el);//找到目标元素

        this.target.innerHTML  = this.target.innerHTML.replace("{{num}}",option.data.num);
        this.target.innerHTML = this.target.innerHTML.replace("{{username}}",option.data.username);

        // alert(this.target.innerHTML);

    }


    new  Vue({
            el:"#app",
            data:{
                num:99,
                username:"leson"
            }
    })
    
</script>
</html>